﻿<%@ Page  Language="C#" MasterPageFile="~/MasterPage/MasterPage.master"
    AutoEventWireup="true" Inherits="SouthernLand.Membership.ChangePassword" CodeBehind="ChangePassword.aspx.cs" %>

<%@ Register Src="~/Controls/Title.ascx" TagName="Title" TagPrefix="uc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PageContent" runat="Server">
    <uc:Title runat="server" ID="Title" Visible="false" />
    <table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
        <tr>
               <td class="list-real-estate-frame-top-left">
                &nbsp;
            </td>
            <td align="left" class="list-real-estate-frame-top width-98-5-pct">
                <span class="Frame_Title">
                    <asp:Label ID="FrameTitle" runat="server" Text="Đổi mật khẩu"></asp:Label></span>
            </td>
             <td class="list-real-estate-frame-top-right">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td class="list-real-estate-frame-mid-left">
            </td>
            <td class="width-98-5-pct padding-top-10">
                <table align="center" width="100%">
                    <tr>
                        <td align="center">
                            <asp:ChangePassword ID="ChangePassword2" runat="server">
                                <ChangePasswordTemplate>
                                    <table cellpadding="2" border="0" align="center">
                                        <tr>
                                            <td align="right">
                                                Mật khẩu cũ :
                                            </td>
                                            <td>
                                                <asp:TextBox ID="CurrentPassword" TextMode="Password" runat="server" Width="150px"></asp:TextBox>
                                            </td>
                                            <td>
                                                <asp:RequiredFieldValidator ID="valRequireCurrentPassword" runat="server" ControlToValidate="CurrentPassword"
                                                    SetFocusOnError="true" Display="Dynamic" ErrorMessage="Password is required."
                                                    ToolTip="Password is required." ValidationGroup="ChangePassword1">*</asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right">
                                                Mật khẩu mới :
                                            </td>
                                            <td>
                                                <asp:TextBox ID="NewPassword" TextMode="Password" runat="server" Width="150px"></asp:TextBox>
                                            </td>
                                            <td>
                                                <asp:RequiredFieldValidator ID="valRequireNewPassword" runat="server" ControlToValidate="NewPassword"
                                                    SetFocusOnError="true" Display="Dynamic" ErrorMessage="New Password is required."
                                                    ToolTip="New Password is required." ValidationGroup="ChangePassword1">*</asp:RequiredFieldValidator>
                                                <asp:RegularExpressionValidator ID="valPasswordLength" runat="server" ControlToValidate="NewPassword"
                                                    SetFocusOnError="true" Display="Dynamic" ValidationExpression="\w{5,}" ErrorMessage="New Password must be at least 5 characters long."
                                                    ToolTip="New Password must be at least 5 characters long." ValidationGroup="ChangePassword1">*</asp:RegularExpressionValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right">
                                                Nhập lại mật khẩu mới :
                                            </td>
                                            <td>
                                                <asp:TextBox ID="ConfirmNewPassword" TextMode="Password" runat="server" Width="150px"></asp:TextBox>
                                            </td>
                                            <td>
                                                <asp:RequiredFieldValidator ID="valRequireConfirmNewPassword" runat="server" ControlToValidate="ConfirmNewPassword"
                                                    SetFocusOnError="true" Display="Dynamic" ErrorMessage="Confirm Password is required."
                                                    ToolTip="Confirm Password is required." ValidationGroup="ChangePassword1">*</asp:RequiredFieldValidator>
                                                <asp:CompareValidator ID="valComparePasswords" runat="server" ControlToCompare="NewPassword"
                                                    ControlToValidate="ConfirmNewPassword" SetFocusOnError="true" Display="Dynamic"
                                                    ErrorMessage="The Confirm Password must match the New Password entry." ValidationGroup="ChangePassword1">*</asp:CompareValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="3" align="right" style="padding-right: 8px;">
                                                <asp:Button ID="ChangePasswordPushButton" runat="server" CommandName="ChangePassword"
                                                    Text="Đổi mật khẩu" ValidationGroup="ChangePassword1" />
                                            </td>
                                        </tr>
                                    </table>
                                </ChangePasswordTemplate>
                                <SuccessTemplate>
                                    Mật khẩu của bạn đã được thay đổi thành công
                                </SuccessTemplate>
                            </asp:ChangePassword>
                            <asp:ValidationSummary runat="server" ID="valChangePasswordSummary" ValidationGroup="ChangePassword1"
                                ShowMessageBox="true" ShowSummary="false" />
                        </td>
                    </tr>
                </table>
            </td>
            <td class="list-real-estate-frame-mid-right">
            </td>
        </tr>
        <tr>
             <td class="list-real-estate-frame-bot-left">
            </td>
            <td align="center" class="list-real-estate-frame-bot-center">
            </td>
            <td class="list-real-estate-frame-bot-right">
            </td>
        </tr>
    </table>
</asp:Content>
